package com.example.homework_20221008.product;


import com.example.homework_20221008.InsuranceProduct;

public class DreadDiseaseInsurance implements InsuranceProduct<DreadDiseaseInsurance.Gender> {

    private String name = "";

    private double amount;

    public DreadDiseaseInsurance() {
        this.amount = 500000;
    }

    public double getAmount() {
        return amount;
    }

    public double calculate(Gender gender) {
        if (Gender.MALE == gender) {
            return 3090;
        } else {
            return 2970;
        }
    }

    public enum Gender {
        MALE,
        FEMALE
    }
}
